import Cookies from 'js-cookie'

/* 设置本地存储的key */
const TokenKey = 'hrsaas-ihrm-token'
const TokenOutTime = 'hrsaas-time-token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

/* 存放时间戳 */
export function setTimeOut() {
  return Cookies.set(TokenOutTime, Date.now())
}
/* 取出时间戳 */
export function getTimeOut() {
  return Cookies.get(TokenOutTime)
}

